package com.guoxue.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.guoxue.dao.IExplainConfigDao;
import com.guoxue.domain.ExplainConfigVo;
@Repository
public class ExplainConfigDaoImpl extends BaseDaoImpl<ExplainConfigVo> implements IExplainConfigDao {

	@Override
	public void saveExplain(ExplainConfigVo ec) {
		saveOrUpdate(ec);
	}

	@Override
	public List<ExplainConfigVo> getExplainConfigList() {
		return find("From ExplainConfigVo");
	}

	@Override
	public void deleteExplainConfig(int id) {
		executeHql("DELETE FROM ExplainConfigVo e WHERE explainId=?", new Object[] {id});
	}

	@Override
	public List<ExplainConfigVo> getExplainConfigList(int begin, int end) {
		return find("FROM ExplainConfigVo p WHERE p.explainId BETWEEN	? AND ?",new Object[] {begin,end});
	}

}
